var assert = require('assert');
var should = require('should');
var util = require('util');
var _ = require('lodash');
var wishTreeModel = require('../../app/models/wishtreeModel.js');
var config = require('../config');

suite('测试WishtreeModel', function () {
    var wishtree_model;

    setup(function (done) {
        wishTreeModel.getByRoleId(config.role_id, function (err, model) {
            assert.equal(err == null, true);
            wishtree_model = model;
            wishtree_model.toJSON();
            done();
        });
    });

    suite('addWishtreeNum', function () {
        test('增加已购买type', function (done) {
            //wishtree_model.addWishtreeNum(4);
            //wishtree_model.save();
            done();
        });
    });

    suite('getWishtreeNum', function () {
        test('获取已购买type', function () {
            wishtree_model.getWishtreeNum();
            //console.log(wishtree_model.getWishtreeNum(4));
        });
    });

    suite('subFreeWishtreeNum', function () {
        test('扣除免费次数', function () {
            //wishtree_model.subFreeWishtreeNum();
            //wishtree_model.save();
        });
    });

    suite('getFreeWishtreeNum', function () {
        test('获取已购买type', function () {
            assert.equal(wishtree_model.getWishtreeList() != null, true);
        });
    });
});
